import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Credits here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Credits extends Boton
{
    /**
     * Act - do whatever the Credits wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    
    public void act() 
    {
        if(Greenfoot.mouseClicked(this)){
           getWorld().setBackground("creditsScreen.png");
           getWorld().removeObjects(getWorld().getObjects(Records.class));
           getWorld().removeObjects(getWorld().getObjects(Play.class));
           getWorld().removeObjects(getWorld().getObjects(Help.class));
           getWorld().addObject(new Return(),50,56);
           getWorld().removeObject(this);
        }
        
    }    
}
